import request from './axios';

/**
 * 获取客户信息
 * @param customerId 客户ID
 */
export function getCustomerById(customerId: string) {
  return request({
    url: `/user/customer/${customerId}`,
    method: 'get',
    headers: {
      'Authorization': `Bearer ${localStorage.getItem('token') || ''}`,
      'X-Merchant-ID': 'MERCHANT001' // 添加商家ID头，表明这是商家请求
    }
  });
}

/**
 * 获取客户资料
 * @param customerId 客户ID
 */
export function getCustomerProfile(customerId: string) {
  return request({
    url: `/user/profile/${customerId}`,
    method: 'get',
    headers: {
      'Authorization': `Bearer ${localStorage.getItem('token') || ''}`,
      'X-Merchant-ID': 'MERCHANT001' // 添加商家ID头，表明这是商家请求
    }
  });
} 